<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>userList</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}"></link>
</head>
<body class="container">
<br/>
<h1>用户列表</h1>

<div class="with:100%">
    <table class="table table-hover">
        <thead>
        <tr>
        	<th>#</th>
            <th>userId</th>
            <th>userName</th>
            <th>password</th>
            <th>email</th>
            <th>name</th>
            <th>createTime</th>
            <th>state</th>
            <th>edit</th>
            <th>delete</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="user,stat : ${users}">
        	<th th:text="${stat.count}"></th>
            <th th:text="${user.userId}"></th>
            <td th:text="${user.userName}"></td>
            <td th:text="${user.password}"></td>
            <td th:text="${user.email}"></td>
            <td th:text="${user.name}"></td>
            <td th:text="${user.createTime}"></td>
            <td th:text="${user.state}"></td>
            <td><a th:href="@{/gotoUserEdit(id=${user.userId})}">edit</a></td>
            <td><a th:href="@{/delete(id=${user.userId})}">delete</a></td>
        </tr>
        </tbody>
    </table>
</div>
<div class="form-group">
    <div class="col-sm-2 control-label">
        <a href="/gotoUserAdd" th:href="@{/gotoUserAdd}" class="btn btn-info">add</a>
    </div>
</div>

</body>
</html>